package News.service.impl;

import java.util.List;

import News.dao.International_NewsDao;
import News.dao.impl.International_NewsDaoImpl;
import News.entity.International_News;
import News.service.International_NewsService;

public class International_NewsServiceImpl implements International_NewsService{
	
	private International_NewsDao IO = new International_NewsDaoImpl();
	
	public List<International_News> findAllNewsInfo() {
		return IO.findAllInternationalNews();
	}

	public boolean delNewsById(int NewsId) {
		boolean flag = true;
		if(IO.delNewsId(NewsId)<1){
			return false;
		}else{
		return flag;
		}
	}

	public boolean addNews(int NewsId, String NewsContent, String Time,int NumOfRead) {
		boolean flag = true;
		if(IO.addNews(NewsId, NewsContent, Time, NumOfRead)<1){
			return false;
		}else{
		return flag;
		}
	}

	public boolean updateNews(String NewsContent, String Time,int NumOfRead,int NewsId) {
		boolean flag = true;
		if(IO.updateNews(NewsContent, Time, NumOfRead,NewsId)<1){
			return false;
		}
		return flag;
	}

	public List<International_News> getPageNewsList(int CurrNo, int PageSize) {
		
		return IO.getPageNewsList(CurrNo, PageSize);
	}

	public int getTotalCount() {
		return IO.getTotalCount();
	}

	
	
}
